<?php
unset($_SESSION['userInfo']);
unset($_SESSION['isLogin']);
?>
<!DOCTYPE html>
<html class="no-js" lang="en" xmlns:wb="//open.weibo.com/wb">
<head>
<meta property="wb:webmaster" content="5484432369151ac2" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>SwooleChat</title>
<meta name="keywords" content="Swoole,聊天室">
<meta name="description" content="SwooleChat">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/files/reset.css">
<link rel="stylesheet" href="/files/supersized.css">
<link rel="stylesheet" href="/files/style.css">

<script src="//tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=2093036628" type="text/javascript" charset="utf-8"></script>

<script>

WB2.anyWhere(function(W){
	W.widget.connectButton({
		id: "wb_connect_btn",	
		type:"3,2",
		callback : {
			login:function(o){	//登录后的回调函数
				console.log(o)
			},	
			logout:function(){	//退出后的回调函数
			}
		}
	});
});
</script>
    </head>
    <body>
        <div class="page-container">
            <h1>SwooleChat</h1>
    			<form action="/" method="post">
					<input name="user" id='user'  maxlength="20"  class="username" placeholder="Your Nick" type="text" />
					<span style=' margin-top:20px; vertical-align:middle; display:inline-block;'></span>
                
                	<button type="submit">Login</button>
                	<div class="error" id='error'><span>+</span></div>
					<wb:login-button type="3,2" onlogin="login" onlogout="logout">登录按钮</wb:login-button>
            	</form>
            <div class="connect">
            </div>
        </div>
        <!-- Javascript -->
        <script src="/files/jquery-1.js"></script>
        <script src="/files/supersized.js"></script>
        <script src="/files/supersized-init.js"></script>
        <script src="/files/scripts.js"></script>
</body>
</html>
